class Solution {
    public boolean isPalindrome(int x) {
        if(x<0) {
            return false;
        }
        int ret = 0,src = x;
        while(src>0) {
            ret = ret*10 +src%10;
            src/=10;
        }
        return x == ret;
    } 
    }